#include "stdio.h"
#include "math.h"

int main()
{
	double p;
	int k,n;
	scanf("%d %lf", &n, &p);
	k=floor(0.5+exp(log(p)/n));
	printf("%d\n", k);
	return 0;
}